<template>
	<view class="box">
		<view class="box1">
			<view class="img">
				<image src="https://jw.xzsw2021.com/static/index/icon_29@2x.png" mode=""></image>
			</view>
			<view class="status f34">{{text1}}</view>
			<view class="desc f30">{{text2}}</view>
			<view class="btn" @click="goBack">{{text3}}</view>
			<view class="f24 c999" v-if="type==9" style="margin-top: 20rpx;">注：余额不可提现，只可用平台购物</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type:1,//
				text1:'提交成功',
				text2:'感谢您的反馈，我们会做得更好',
				text3:'返回首页',
			}
		},
		onLoad(options) {
			if(options.type){
				this.type=options.type
			}
			// 
			if(this.type==1){//价高点我-提交成功
				uni.setNavigationBarTitle({
					title:'提交成功'
				})
				this.text1='提交成功'
				this.text2='感谢您的反馈，我们会做得更好'
				this.text3='返回首页'
			}else if(this.type==2){//积分兑换会员-
				uni.setNavigationBarTitle({
					title:'兑换成功'
				})
				this.text1='兑换成功'
				this.text2='恭喜您已经成为我们的会员，可享受专属特权'
				this.text3='去首页逛逛'
			}else if(this.type==3){//购买会员-
				uni.setNavigationBarTitle({
					title:'购买成功'
				})
				this.text1='购买会员成功'
				this.text2='可赠送亲友商品券，商品券能免费赠送商品'
				this.text3='赠送商品券'
			}else if(this.type==4){//商品券商品兑换成功
				uni.setNavigationBarTitle({
					title:'兑换成功'
				})
				this.text1='兑换成功'
				this.text2='详情请在我的订单当中查看'
				this.text3='我的订单'
			}else if(this.type==5){//购买年会员成功
				uni.setNavigationBarTitle({
					title:'购买成功'
				})
				this.text1='购买家味年会员成功'
				this.text2='可赠送亲友4张亲友卡'
				this.text3='赠送亲友卡'
			}else if(this.type==6){//申请售后提交成功
				uni.setNavigationBarTitle({
					title:'提交成功'
				})
				this.text1='提交成功'
				this.text2='您的售后申请已成功，详情请在我的售后订单查看'
				this.text3='退换/售后'
			}else if(this.type==7){//申请开票提交成功
				uni.setNavigationBarTitle({
					title:'提交成功'
				})
				this.text1='申请开票成功'
				this.text2='您可以在开票历史中查看本次详情'
				this.text3='开票历史'
			}else if(this.type==8){//申请开票提交成功
				uni.setNavigationBarTitle({
					title:'评价成功'
				})
				this.text1='评价成功'
				this.text2='恭喜您获得积分，积分可以抵现或兑换会员'
				this.text3='去首页逛逛'
			}else if(this.type==9){//礼品卡兑换成功
				uni.setNavigationBarTitle({
					title:'兑换成功'
				})
				this.text1='兑换成功'
				this.text2='礼品卡的金额已成功兑换到我的余额'
				this.text3='个人中心'
			}else if(this.type==10){//礼品卡兑换成功
				uni.setNavigationBarTitle({
					title:'兑换成功'
				})
				this.text1='兑换成功'
				this.text2='详情请去我的积分当中查看'
				this.text3='我的积分'
			}else if(this.type==10){//满汉任务评价成功
				uni.setNavigationBarTitle({
					title:'评价成功'
				})
				this.text1='评价成功'
				this.text2='已经获得食材'
				this.text3='去领取'
			}else if(this.type==11){//满汉任务问卷回答提交成功
				uni.setNavigationBarTitle({
					title:'提交成功'
				})
				this.text1='提交成功'
				this.text2='感谢您的支持，您已获得10食材'
				this.text3='去领取'
			}else if(this.type==12){//满汉-商品兑换成功
				uni.setNavigationBarTitle({
					title:'兑换成功'
				})
				this.text1='兑换成功'
				this.text2='详情请在我的订单当中查看'
				this.text3='我的订单'
			}else if(this.type==13){//拼团订单付款成功
				uni.setNavigationBarTitle({
					title:'付款成功'
				})
				this.text1='付款完成'
				this.text2='您可以在拼团订单中查看详情'
				this.text3='拼团订单'
			}else if(this.type==14){//提现申请成功
				uni.setNavigationBarTitle({
					title:'提现申请成功'
				})
				this.text1='提现申请成功'
				this.text2='请耐心等待后台审核，详情可在提现明细中查看'
				this.text3='奖金明细'
			}
			
		},
		methods: {
			goBack(){
				if(this.type==1){
					uni.switchTab({
						url:'/pages/index/index'
					})
					return false
				}else if(this.type==2){
					uni.switchTab({
						url:'/pages/index/index'
					})
					return false
				}else if(this.type==3){
					console.log('赠送');
					return false
				}else if(this.type==4){//我的订单
					console.log('订单');
					uni.redirectTo({
						url:'/pages/client/order/order'
					})
					return false
				}else if(this.type==5){//赠送亲友卡
					console.log('赠送亲友卡');
					uni.redirectTo({
						url:'/pages/user/plus/friends-card/friends-card'
					})
					return false
				}else if(this.type==6){//退换/售后
					console.log('退换/售后');
					uni.navigateTo({
						url:'/pages/client/order/order-aftersale/order-aftersale'
					})
					return false
				}else if(this.type==7){//开票历史
					console.log('开票历史');
					uni.redirectTo({
						url:'/pages/client/order/history-kaipiao/history-kaipiao'
					})
					return false
				}else if(this.type==8){//去首页逛逛
					console.log('去首页逛逛');
					uni.switchTab({
						url:'/pages/index/index'
					})
					return false
				}else if(this.type==9){//个人中心
					console.log('个人中心');
					uni.switchTab({
						url:'/pages/user/user'
					})
					return false
				}else if(this.type==10){//我的积分
					console.log('我的积分');
					uni.redirectTo({
						url:'/pages/user/mypoints/mypoints'
					})
					return false
				}else if(this.type==10){//去领取食材
					console.log('去领取食材');
					uni.redirectTo({
						url:'/pages/user/banquest/banquest'
					})
					return false
				}else if(this.type==11){//去领取食材
					console.log('去领取食材');
					uni.redirectTo({
						url:'/pages/user/banquest/banquest'
					})
					return false
				}else if(this.type==12){//满汉全席-商品兑换成功-我的订单
					console.log('商品兑换成功');
					uni.redirectTo({
						url:'/pages/client/order/order?type=2'
					})
					return false
				}else if(this.type==13){//拼团订单
					console.log('拼团订单');
					uni.reLaunch({
						url:'/pages/user/spellgroup/order-list'
					})
					return false
				}else if(this.type==14){//佣金明细
					console.log('奖金明细');
					uni.redirectTo({
						url:'/pages/user/balance/balance-detail?type=2',
					})
					return false
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.box{
		.box1{
			overflow: hidden;
			text-align: center;
			.img{
				margin: 210rpx auto 0;
				width: 480rpx;
				height: 318rpx;
				image{
					width: 100%;
					height: 100%;
				}
			}
			.status{
				margin: 16rpx 0 18rpx;
			}
			.desc{
				color: #666;
			}
			.btn{
				margin: 200rpx auto 0;
				width: 300rpx;
				height: 100rpx;
				line-height: 100rpx;
				text-align: center;
				color: #fff;
				font-size: 32rpx;
				background: linear-gradient(64deg, #2BCCA5, #22B591);
				box-shadow: 0rpx 4rpx 6rpx 0rpx rgba(20, 187, 146, 0.4);
				border-radius: 10rpx;
			}
		}
	}
</style>
